]> dgit.raspbian.org Git - gnome-shell.git/commit
st: Ensure to reset all widget theme nodes
authorCarlos Garnacho <carlosg@gnome.org>
Sat, 25 Apr 2020 16:31:11 +0000 (18:31 +0200)
committerRobert Mader <robert.mader@posteo.de>
Tue, 28 Apr 2020 18:46:13 +0000 (18:46 +0000)
commit325ff73c5b94f713073f117f0cb6a01049c5052f
tree90e97647e54c26623696273e33a3c0b4c015944a
parent1fa4e3b1b2132b85b154ac9f1330c2e9db56adc0
st: Ensure to reset all widget theme nodes

Theme node invalidation stops at unmapped widgets, and widgets
that forget to chain up to the default ::style-changed implementation.
This may leave stale nodes that were invalidated on
StThemeContext::changed, but are still set on widgets, and maybe
used for CSS property lookups.

Make sure that theme node invalidation happens always by moving
propagation outside the vfunc, and ensure the theme nodes are reset
across the full actor tree. Emission of ::style-changed, and obtaining
a new theme node may be delayed till when the actor is mapped.

The theme node is also cleared after unparenting an actor to avoid
stale references.

This ensures that all widgets get their theme node cleared after
stylesheet changes, instead of maybe being left with a theme node
that's been cleared of all its properties.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2541
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1223
src/st/st-widget.c